package com.example.anno.ioc;

import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

import java.util.stream.Collectors;

public class ColorImportSelector implements ImportSelector{
    @Override
    public String[] selectImports(AnnotationMetadata meta) {
        String annotationTypes = String.join(",", meta.getAnnotationTypes());
        String simpleName = meta.getClass()
                .getSimpleName();
        System.out.println("annotationTypes = " + annotationTypes) ;
        System.out.println("simpleName = " + simpleName) ;

        return new String[]{
            "com.example.anno.entity.Color",
        };
    }
}
